// MBStudioView.h : interface of the CCodeView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_SAMPLEVIEW_H__B1B69ED3_9FCE_11D2_8CA4_0080ADB8683C__INCLUDED_)
#define AFX_SAMPLEVIEW_H__B1B69ED3_9FCE_11D2_8CA4_0080ADB8683C__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "../c_crystaledit/CCrystalEditView.h"
using namespace CrysEdit;
#include "../c/MainFrm.h"

namespace EditCode{
class CCodeDoc;

class CCodeView : public CCrystalEditView
{
protected: // create from serialization only
	CCodeView();
	DECLARE_DYNCREATE(CCodeView)

// Attributes
public:
	CCodeDoc* GetDocument();
	CMainFrame*  GetMainFrame()
	{
		return (CMainFrame*)AfxGetMainWnd();
	}
	virtual CCrystalTextBuffer *LocateTextBuffer();

protected:
	virtual DWORD ParseLine(DWORD dwCookie, int nLineIndex, TEXTBLOCK *pBuf, int &nActualItems);

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCodeView)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
	//}}AFX_VIRTUAL
	virtual void OnMarginLButtonDown(CPoint text_xy);

// Implementation
public:
	virtual ~CCodeView();
	void UpdateIface(void);
	void OnUpdate(CView* pSender, LPARAM lHint, CObject* /*pHint*/);
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CCodeView)
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in MBStudioView.cpp
inline CCodeDoc* CCodeView::GetDocument()
   { return (CCodeDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
};

#endif // !defined(AFX_SAMPLEVIEW_H__B1B69ED3_9FCE_11D2_8CA4_0080ADB8683C__INCLUDED_)
